import random
import string

all_characters = string.ascii_letters + string.digits + '_'

character_groups = []
for _ in range(20):
    group = ''.join(random.choice(all_characters) for _ in range(8))
    character_groups.append(group)

print("字符串（以空格分隔）：", ' '.join(character_groups))
print("列表：", character_groups)
print("集合：", set(character_groups))
print("元组：", tuple(character_groups))

first_group = character_groups[0]
print(f"第一个字符组的4-7位字符（字符串切片）：{first_group[3:8]}")
print(f"列表中第一个字符组的4-7位字符（列表切片）：{character_groups[0][3:8]}")
